Repository navigation
id: extract id-cli crate; facade becomes re-exports + main.rs (split step 7b, #4411) - #9362
Conversation
…step 7b, #4411) Move the application layer out of the facade: cli, commands, repl and server_config, plus the support modules only they use - local, meta_client, protocol, helpers, chat_presence, app_manifest, match_audit, peer_announcement, aliases, publications and publications_runtime - into crates/id-cli. The facade fileops test modules move too (they exercise id_sync::fileops through the LocalNode harness in local.rs); the facade fileops module is now the pure re-export. tests/aliases.rs narrows to id-cli/tests, naming the origin crates directly (id_cli, id_store, id_events, id_core). The facade keeps main.rs and re-exports every moved module at its historical id:: path, plus the root convenience layer (id::Cli, id::cmd_*, id::open_store, ...) re-pointed at id_cli. Root helpers the commands relied on moved into id-cli lib.rs (parse_stdin_items, read_input, export_blob, to_absolute); the facade re-exports them at id:: too. id-cli mirrors the facade feature gates the moved code uses (sandbox, world, ssh, web, dht) and carries its own axum under web; the facade no longer links axum directly. Relative-path casualties of the move are repaired: include_bytes! paths for the tic-tac-toe wasm and the roc-counter example, CARGO_MANIFEST_DIR joins for the README command-table tests and the checked-in app manifest, doctests now name id_cli. Verification (details in the PR): facade 973 passed / 0 failed (was 1651; the delta is the moved code and its tests), id-cli 677 passed / 0 failed plus 7 aliases tests, workspace members 3532 passed with only the two named pre-existing failures (#8354 frames; the web/dist manifest test that needs the bun build), suite B 988 passed / 1 failed (the pre-existing serve test, #9274). FUEL_BUDGETS byte-identical.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 38 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Nix record, part 1 ( |
|
Nix record, part 2 ( |
Step 7b of the pkgs/id crate split (#4411): the application layer leaves the facade. With this, the facade is what the design specifies — re-exports plus
main.rs— and step 7's remaining piece (the permanent-API decision) is recorded at the end. Step 7a (PR #9340) movedseed_phrase,key_envelopeand the key-file consts down to id-core first, so nothing here reaches back up.What moved (
git mv; implementation exists only in id-cli)src/{cli, commands, repl, server_config}→crates/id-cli/src/…local,meta_client,protocol,helpers,chat_presence,app_manifest,match_audit,peer_announcement(still private),aliases,publications,publications_runtime.fileopsmodule's three test modules (they exerciseid_sync::fileopsthrough theLocalNodeharness inlocal.rs) →id-cli/src/fileops_tests.rs; facadefileopsis now the pure re-export.parse_stdin_items,read_input,export_blob,to_absolute— moved into id-cli's lib.rs; the facade re-exports them atid::.tests/aliases.rs→crates/id-cli/tests/aliases.rs, naming origin crates directly. The binary-spawning suites stay with the facade, since the binary stays there.Facade after
Re-exports every moved module at its historical
id::path and the root convenience layer (id::Cli,id::cmd_*,id::open_store, …) re-pointed atid_cli;main.rsis untouched. id-cli mirrors the facade's feature gates the moved code uses (sandbox,world,ssh,web,dht) and carries its ownaxumunderweb; the facade drops its directaxumdep. Move casualties repaired:include_bytes!paths (tic-tac-toe wasm, roc-counter example),CARGO_MANIFEST_DIRjoins (README command-table tests, checked-in app manifest), doctests namingid_cli.Verification
frames::tests::byte_refusal_does_not_spend_a_frame_token_or_increment_counters) andtest_load_asset_urls_from_manifest(needs the bun-builtweb/dist; empty outside the Nix build, identical in the old layout).--features web,ssh): 988 passed / 1 failed / 9 ignored — the one failure is the pre-existing serve test filed as serve_tests web/iroh world test: forged join not refused with "join denied" (pre-existing, hidden by suite-B compile break) #9274 (proven by A/B on pristine main in step 6c). Suite B's total fell because the web/ssh-gated command tests now live in id-cli's suite.FUEL_BUDGETS: byte-identical.Permanent API vs scaffolding (the step-7 decision)
The facade's re-export surface is kept whole for now — every
id::path that existed before the split still resolves — because the split's own rule was "no API redesign beyond named seam inversions", and downstream consumers (the NixOS module, crash tests, benches) use it. The scaffolding question is therefore deferred as a conscious decision, not an oversight: a later API-tightening pass can retire re-exports per-name with usage data, without another crate move. Nix parity for this PR is recorded in a follow-up comment.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.